﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RawlerTwitter
{
    public class TweetData
    {
        public long Id { get; set; }
        public string Text { get; set; }
        public DateTime Date { get; set; }
        public string ScreenName { get; set; }
        public string UsetId { get; set; }
        public string Location { get; set; }
        public string ProfileImageLocation { get; set; }
        public string Source { get; set; }
        public string Language { get; set; }
        public Dictionary<string, string> Annotations { get; set; }


        public enum TweetDataElements
        {
            Id, Text, Date, ScreenName, UsetId, Location, ProfileImageLocation, Source, Language, Annotations
        }

        public string GetTweetDataElement(TweetDataElements element)
        {
            if (element == TweetDataElements.Id) return Id.ToString();
            else if (element == TweetDataElements.Date) return Date.ToLongDateString() + " " + Date.ToLongTimeString();
            else if (element == TweetDataElements.Language) return Language;
            else if (element == TweetDataElements.Location) return Location;
            else if (element == TweetDataElements.ProfileImageLocation) return ProfileImageLocation;
            else if (element == TweetDataElements.ScreenName) return ScreenName;
            else if (element == TweetDataElements.Source) return Source;
            else if (element == TweetDataElements.Text) return Text;
            else if (element == TweetDataElements.UsetId) return UsetId;
            else { return "TweetDataElementsが不正です"; }
        }
    }
}
